


import { register, login } from '@/api/index'


export default {
  state: {
  },
  actions: {
    registerUser({ commit }, userinfo) {
      return new Promise((resolve, reject) => {
        register(userinfo).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    },
    loginUser({ commit }, userinfo) {
      return new Promise((resolve, reject) => {
        login(userinfo).then(res => {
          resolve(res)
        }).catch(error => {
          reject(error)
        })
      })
    }
  },
  mutations: {
  },
  getters: {

  }
}